<?php require VIEW_ROOT.'/common/header.php'?>

<table>
	<tr>
		<th colspan="2">数据详情</th>
	</tr>
	<tr>
		<td width="200">数据总行数</td>
		<td class="frm"><?php echo $count_all; ?></td>
	</tr>
</table>

<?php
	// Standard inclusions   
	include("resource/pchart/pData.class.php");
	include("resource/pchart/pChart.class.php");
	
	// Dataset definition
	$DataSet = new pData;
	$DataSet->AddPoint($data, "Serie1");
	$DataSet->AddPoint($label, "Serie2");
	$DataSet->AddAllSeries();
	$DataSet->SetAbsciseLabelSerie("Serie2");
	
	// Initialise the graph
	$Test = new pChart(530,300);
	$Test->drawFilledRoundedRectangle(7,7,523,293,5,240,240,240);
	$Test->drawRoundedRectangle(5,5,525,295,5,230,230,230);
	
	// This will draw a shadow under the pie chart
	$Test->drawFilledCircle(142,152,110,200,200,200);
	
	// Draw the pie chart
	$Test->setFontProperties("resource/fonts/tahoma.ttf",8);
	$Test->drawBasicPieGraph($DataSet->GetData(),$DataSet->GetDataDescription(),140,150,110,PIE_PERCENTAGE,255,255,218);
	$Test->drawPieLegend(350, 50,$DataSet->GetData(),$DataSet->GetDataDescription(),250,250,250);
	
	$img_filename = 'resource/chart/specail_data_per.png';
	$Test->Render($img_filename);
	echo '<table><tr><th>数据比例</th></tr> <tr><td style="background:#ffffff;text-align:left;"><img src="'.$img_filename.'"></td></tr></table>';
?>

<?php require VIEW_ROOT.'/common/footer.php'?>